package ca.compsci.opent.semantics;

import ca.compsci.opent.analysis.AnalysisAdapter;
import ca.compsci.opent.node.*;

public final class OperatorTypeAnalyzer extends AnalysisAdapter {
	public TypedSymbol.Type result;
	
	@Override
	public void caseAAddOpr(AAddOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAAndOpr(AAndOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseADivOpr(ADivOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAIdivOpr(AIdivOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAEqOpr(AEqOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseAGteqOpr(AGteqOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseAGtOpr(AGtOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseALteqOpr(ALteqOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseALtOpr(ALtOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseAModOpr(AModOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAMulOpr(AMulOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseANoteqOpr(ANoteqOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseAOrOpr(AOrOpr node) {
		result = TypedSymbol.Type.Boolean;
	}

	@Override
	public void caseAPowerOpr(APowerOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAShlOpr(AShlOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAShrOpr(AShrOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseASubOpr(ASubOpr node) {
		result = TypedSymbol.Type.Integer;
	}

	@Override
	public void caseAXorOpr(AXorOpr node) {
		result = TypedSymbol.Type.Integer;
	}
}
